package com.qiyadeng.wechat.roo.model;
import java.util.List;

import org.springframework.roo.addon.dbre.RooDbManaged;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooJpaActiveRecord(versionField = "", table = "CATALOG")
@RooDbManaged(automaticallyDelete = true)
public class Catalog {
	
	//得到所有的catalog(排序)
	public static List<Catalog> getAllCatalogOrder(){
		List<Catalog> list = entityManager().createQuery("select o from Catalog o order by o.catOrder",Catalog.class).getResultList();
		return list;
	}
	
}
